A Collection of Minor Enhancements #11
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A Collection of Minor Features
CSS PostMessage (currently only applied to jwe_secure format)
A parent page loading rendered html into an iframe may now send requests via postMessage to update the CSS of the iframe content. This is useful for any LMS looking to embed WeBWorK content in order to achieve style consistency with the parent page. From the perspective of the parent page, the interaction should be established as follows:
New Endpoints
Clone and Delete endpoints are added for management of
private/
content. Delete does exactly what you might expect, deleting files and empty folders. Clone is a little more nuanced. The expectation is that a problem (and any of its static assets) is stored in its own folder, and the clone endpoint duplicates that folder and its immediate children into a new folder as a child ofprivate/
.I'm not super-thrilled with the prospect of using the renderer as a library manager, but it is a necessary interim step in the time before OPLv3 is ready for prime-time.
Expand the Catalogue Endpoint
Previously, the catalogue endpoint would give an array of pg files contained in the requested file path. Now, the catalogue endpoint returns an array of all children (not just pg files). This is helpful for finding the location of static assets such as images.
Fix sessionJWT Interaction
Before this PR, sessionJWT would restore previous answers into their corresponding answer blanks -- but the AttemptsTable would be empty (no rows), although "Results for this submission" would appear. Now the AttemptsTable is populated, and the answer blanks now receive css styling for correct/incorrect status (assuming showPartialCorrectAnswers).
Newly added are request params to skip the AttemptsTable (
hideAttemptsTable
), or when showing the table,hideMessages
will skip the Message column. Already existing, but should be added to the readme, isshowPartialCorrectAnswers
which can override a problem's settings to show or hide individual correct/incorrect responses within the problem.